<template>
	<cl-crud>
		<zm-table :data="list" :columns="columns" :context-menu="[]" :auto-height="false">
		   <template #column-detail="{ scope: { row } }">
			     <div v-if="row.detail">{{row.detail}}</div>
					 <div v-else>无</div>
			 </template>
       <template #column-images="{ scope: { row } }">
			     <div v-if="row.images.length > 0">
			      <el-image
               v-for="(item,index) in row.images" :Key="index"
              style="width: 40px; height: 40px;margin-right: 10px"
              :src="`${item}?x-oss-process=image/resize,limit_0,m_fill,w_40,h_40`"
              :preview-src-list="[item]"
              >
              </el-image>
					 </div>
					 <div v-else >无</div>
			</template>
		</zm-table>
	</cl-crud>
</template>
<script>
export default {
	inject: ["parent"],
	props: {
		detail: {
			type: Object,
			default: () => ({})
		}
	},
	components: {

	},
	data() {
		return {
			list: [],
			columns: [
        {
					label: "原因类型",
					prop: "cause_name",

					align: "center",
					
				},
				{ label: "内容详情", prop: "detail",align: "center",showOverflowTooltip: true },
				{
					label: "图片",
					prop: "images",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "操作用户",
					prop: "operate_user",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "操作时间",
					prop: "create_at",
					align: "center",
					showOverflowTooltip: true
				},
			],
			accountsVisible: false,
			form: {
				cart_id: "",
				appeal_detail: "",
				appeal_images: ""
			},
		};
	},
	computed: {
		 
	},
	methods: {
		async init() {
			const { cus_id, biz_id } = this.detail;
			const data = await this.$service.cart.amendRecode({
				cus_id,
			});
			this.list = data;
		},
	
	}
};
</script>
